<!DOCTYPE html>
<html lang="en" class="svg no-js">
<head>
    <meta charset="utf-8" />
    <!--[if IE ]>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="Language" content="en">

    <title>MySQL :: MySQL 8.0 Reference Manual :: 4.6.8 mysqlbinlog — Utility for Processing Binary Log Files</title>
    <link rel="stylesheet" media="all" href="css/main-20190125.min.css" />
            <link rel="stylesheet" media="all" href="css/docs-20190125.min.css" />
    
    
    <link rel="stylesheet" media="print" href="css/print-20190125.min.css" />

    
    
    
    
            <link rel="contents" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="start" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="prev" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor &mdash; MySQL Configuration Utility" />
<link rel="next" href="mysqlbinlog-hexdump.html?ff=nopfpls" title="4.6.8.1 mysqlbinlog Hex Dump Format" />
<link rel="up" href="programs-admin-utils.html" title="4.6 MySQL Administrative and Utility Programs" />

    
    <link rel="shortcut icon" href="favicon.ico" />
    <script>(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.documentElement)</script>
    <script src="js/site-20181120.min.js"></script>

    
    
    
    <!--[if lt IE 9]>
        <script src="https://labs.mysql.com/common/js/polyfills/html5shiv-printshiv-3.7.2.min.js"></script>
        <script src="https://labs.mysql.com/common/js/polyfills/respond-1.4.2.min.js"></script>
    <![endif]-->
        <!--[if IE 9]>
        <style>#docs-sidebar-toc { box-sizing: content-box; }</style>
    <![endif]-->
    </head>

<body class="no-sidebar full-page dev">
<div class="page-wrapper">
    <header>

                        <a href="https://dev.mysql.com/" aria-label="Home" title="MySQL" id="l1-home-link"></a>
        
        <div id="l1-nav-container">
            <div id="l1-line1">
                <div id="l1-auth-links">
                    <a href="https://www.mysql.com/about/contact/"><b>Contact MySQL</b></a>
                    <span id="l1-contact-separator">&nbsp;|&nbsp;</span>
                    <span id="l1-contact-separator-br"><br /></span>
                                             <a href="https://dev.mysql.com/auth/login/?dest=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Fmysqlbinlog.html">Login</a> &nbsp;|&nbsp;
                         <a href="https://dev.mysql.com/auth/register/">Register</a>
                                    </div>
                <div id="l1-lhs">
                    <div id="l1-slogan">
                        The world's most popular open source database
                    </div>
                    <div id="l1-search-box">
                        <form id="l1-search-form" method="get" action="https://www.oracle.com/search/results">
                        <input type="hidden" name="cat" value="mysql" />
                        <input type="hidden" name="Ntk" value="SI-ALL5" />
                        <input id="l1-search-input" type="search" class="icon-search" placeholder="Search" aria-label="Search" name="Ntt" />
                        </form>
                    </div>
                </div>
            </div>
            <div id="l1-line2">
                <div class="social-icons">
                    <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook"></span></a>
                    <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter"></span></a>
                    <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin"></span></a>
                    <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube"></span></a>
                </div>
                <ul id="l1-nav">
                    <li>
                        <a href="https://www.mysql.com/"><!-- <span class="icon-sakila"></span>  -->MySQL.com</a>
                    </li><li>
                        <a href="https://www.mysql.com/downloads/"><!-- <span class="icon-download-thin"></span>  -->Downloads</a>
                    </li><li class="active">
                        <a href="/doc/"><!-- <span class="icon-books"></span>  -->Documentation</a>
                    </li><li>
                        <a href="/"><!-- <span class="icon-code"></span>  -->Developer Zone</a>
                    </li>                </ul>
            </div>
        </div>
        <div id="sub-header">
            <div id="l2-nav-container">
                <div id="l2-nav-toggle">
                    <span class="icon-three-bars"></span>
                </div>
                                                                                        <a class="button nav-button-3" href="/"><span class="icon-code"></span> Developer Zone</a>
                                                                                                                                    <a class="button nav-button-2" href="https://www.mysql.com/downloads/"><span class="icon-download-thin"></span> Downloads</a>
                                                                                                <a class="button nav-button-1" href="https://www.mysql.com/"><span class="icon-sakila"></span> MySQL.com</a>
                                                                        <div id="l2-search-toggle">
                    <span class="icon-search"></span>
                </div>
                <div id="l2-site-icon">
                                                                                                                                                                                                    <span class="icon-books"></span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </div>
                <div id="l1-section-title">
                    <span id="l1-section-label">
                        <a href="/doc/">Documentation</a>
                    </span>
                </div>
                <nav>
                    

<ul id="l2-nav">
            	<li class="active"><a class="active " href="/doc/refman/en/">MySQL Server</a>
    			</li>
	        	<li class=""><a  href="/doc/index-enterprise.html">MySQL Enterprise</a>
    			</li>
	        	<li class=""><a  href="/doc/workbench/en/">Workbench</a>
    			</li>
	        	<li class=""><a  href="/doc/en/mysql-innodb-cluster-userguide.html">InnoDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-cluster.html">MySQL NDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-connectors.html">Connectors</a>
    			</li>
	        	<li class=" last"><a  href="/doc/index-other.html">More</a>
    			</li>
	                        <li class="other-section"><a href="https://www.mysql.com/">MySQL.com</a></li>
                            <li class="other-section"><a href="https://www.mysql.com/downloads/">Downloads</a></li>
                                        <li class="other-section"><a href="/">Developer Zone</a></li>
            </ul>
                </nav>
            </div>
            <div id="l3-search-container"></div>
            <div id="top-orange"><span id="section-nav">Section Menu: &nbsp; </span></div>
        </div>
    </header>
        <div id="page">
                        <div role="main" id="main">

            
                
            
<div>
    <div id="docs-sidebar-toc" class="">
    <div id="docs-toc-inner">
        <div class="docs-sidebar-header" id="docs-nav-header">
            <a class="docs-show-hide-nav" id="docs-hide-nav" href="" title="Hide Sidebar" aria-label="Hide Sidebar"><span class="icon-arrow-small-left"></span></a>
            <div class="docs-nav-links">
                                    
    <a href="mysql-config-editor.html"
        aria-label="Previous" title="Previous: mysql_config_editor — MySQL Configuration Utility"><span
        class="icon-chevron-left"></span></a>
<a href="index.html" aria-label="Start" title="Start"><span class="icon-book-open"></span></a>
        <a aria-label="Up" href="programs-admin-utils.html" title="Up: MySQL Administrative and Utility Programs"><span class="icon-chevron-up"></span></a>
    <a href="mysqlbinlog-hexdump.html" aria-label="Next"
        title="Next: mysqlbinlog Hex Dump Format"><span
        class="icon-chevron-right"></span></a>
                            </div>
        </div>
                    
<div id="docs-sidebar-search-container">
    <div id="docs-sidebar-search-box">
        <form method="get" action="/mysql-manual/search-page">
            <input type="hidden" name="d" id="d" value="201" />
            <input type="hidden" name="p" id="p" value="1" />
            <input type="text" name="keyword" id="q" title="Search this Manual"
                value=""
                style="color: #bbb;"
                onfocus=""
                onblur="" />

            <button class="docs-sidebar-search-btn" aria-label="Search" title="Search" type="submit">
                <span class="icon-search"></span>
            </button>
        </form>
    </div>
</div>
                <div class="docs-sidebar-nav">
            <a class="docs-icon-home" href="/doc/"><span class="icon-home"></span>Documentation Home</a><hr />
            <div class="docs-sidebar-mtitle">MySQL 8.0 Reference Manual</div>
            <nav class="doctoc" id="doc-201">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="preface.html">Preface and Legal Notices</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="introduction.html">General Information</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="installing.html">Installing and Upgrading MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="tutorial.html">Tutorial</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs.html">MySQL Programs</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="programs-overview.html">Overview of MySQL Programs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-using.html">Using MySQL Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="invoking-programs.html">Invoking MySQL Programs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="program-options.html">Specifying Program Options</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="command-line-options.html">Using Options on the Command Line</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-files.html">Using Option Files</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-file-options.html">Command-Line Options that Affect Option-File Handling</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-modifiers.html">Program Option Modifiers</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="program-variables.html">Using Options to Set Program Variables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-defaults-equals.html">Option Defaults, Options Expecting Values, and the = Sign</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connection-options.html">Command Options for Connecting to the Server</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connecting.html">Connecting to the MySQL Server Using Command Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connecting-using-uri-or-key-value-pairs.html">Connecting to the Server Using URI-Like Strings or Key-Value Pairs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connection-compression-control.html">Connection Compression Control</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="setting-environment-variables.html">Setting Environment Variables</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-server.html">MySQL Server and Server-Startup Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqld.html">mysqld — The MySQL Server</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqld-safe.html">mysqld_safe — MySQL Server Startup Script</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-server.html">mysql.server — MySQL Server Startup Script</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqld-multi.html">mysqld_multi — Manage Multiple MySQL Servers</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-installation.html">MySQL Installation-Related Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="comp-err.html">comp_err — Compile MySQL Error Message File</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-secure-installation.html">mysql_secure_installation — Improve MySQL Installation Security</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-ssl-rsa-setup.html">mysql_ssl_rsa_setup — Create SSL/RSA Files</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-tzinfo-to-sql.html">mysql_tzinfo_to_sql — Load the Time Zone Tables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-upgrade.html">mysql_upgrade — Check and Upgrade MySQL Tables</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-client.html">MySQL Client Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql.html">mysql — The MySQL Command-Line Client</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-command-options.html">mysql Client Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-commands.html">mysql Client Commands</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-logging.html">mysql Client Logging</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-server-side-help.html">mysql Client Server-Side Help</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-batch-commands.html">Executing SQL Statements from a Text File</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-tips.html">mysql Client Tips</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqladmin.html">mysqladmin — Client for Administering a MySQL Server</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlcheck.html">mysqlcheck — A Table Maintenance Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqldump.html">mysqldump — A Database Backup Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlimport.html">mysqlimport — A Data Import Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlpump.html">mysqlpump — A Database Backup Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlshow.html">mysqlshow — Display Database, Table, and Column Information</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlslap.html">mysqlslap — Load Emulation Client</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-admin-utils.html">MySQL Administrative and Utility Programs</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="ibd2sdi.html">ibd2sdi — InnoDB Tablespace SDI Extraction Utility</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="innochecksum.html">innochecksum — Offline InnoDB File Checksum Utility</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisam-ftdump.html">myisam_ftdump — Display Full-Text Index information</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="myisamchk.html">myisamchk — MyISAM Table-Maintenance Utility</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-general-options.html">myisamchk General Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-check-options.html">myisamchk Check Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-repair-options.html">myisamchk Repair Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-other-options.html">Other myisamchk Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-table-info.html">Obtaining Table Information with myisamchk</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-memory.html">myisamchk Memory Usage</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamlog.html">myisamlog — Display MyISAM Log File Contents</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisampack.html">myisampack — Generate Compressed, Read-Only MyISAM Tables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-config-editor.html">mysql_config_editor — MySQL Configuration Utility</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link current"><a href="mysqlbinlog.html">mysqlbinlog — Utility for Processing Binary Log Files</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-hexdump.html">mysqlbinlog Hex Dump Format</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-row-events.html">mysqlbinlog Row Event Display</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-backup.html">Using mysqlbinlog to Back Up Binary Log Files</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-server-id.html">Specifying the mysqlbinlog Server ID</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqldumpslow.html">mysqldumpslow — Summarize Slow Query Log Files</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-development.html">MySQL Program Development Utilities</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-config.html">mysql_config — Display Options for Compiling Clients</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="my-print-defaults.html">my_print_defaults — Display Options from Option Files</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-miscellaneous.html">Miscellaneous Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="lz4-decompress.html">lz4_decompress — Decompress mysqlpump LZ4-Compressed Output</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="perror.html">perror — Display MySQL Error Message Information</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="zlib-decompress.html">zlib_decompress — Decompress mysqlpump ZLIB-Compressed Output</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="environment-variables.html">MySQL Environment Variables</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="server-administration.html">MySQL Server Administration</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="security.html">Security</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="backup-and-recovery.html">Backup and Recovery</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="optimization.html">Optimization</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="language-structure.html">Language Structure</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="charset.html">Character Sets, Collations, Unicode</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-types.html">Data Types</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="functions.html">Functions and Operators</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax.html">SQL Statement Syntax</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-dictionary.html">MySQL Data Dictionary</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="innodb-storage-engine.html">The InnoDB Storage Engine</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="storage-engines.html">Alternative Storage Engines</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication.html">Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="group-replication.html">Group Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-shell-userguide.html">MySQL Shell</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="document-store.html">Using MySQL as a Document Store</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-innodb-cluster-userguide.html">InnoDB Cluster</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-cluster.html">MySQL NDB Cluster 8.0</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="partitioning.html">Partitioning</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="stored-objects.html">Stored Objects</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="information-schema.html">INFORMATION_SCHEMA Tables</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="performance-schema.html">MySQL Performance Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sys-schema.html">MySQL sys Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="connectors-apis.html">Connectors and APIs</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="extending-mysql.html">Extending MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-enterprise.html">MySQL Enterprise Edition</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="workbench.html">MySQL Workbench</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="faqs.html">MySQL 8.0 Frequently Asked Questions</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="error-handling.html">Errors, Error Codes, and Common Problems</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="restrictions.html">Restrictions and Limits</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="indexes.html">Indexes</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="glossary.html">MySQL Glossary</a></div></div>                    </li>
        </ul>
                            </nav>
        </div>

        
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian open">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian open">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>

        <br /><span id="wkr"><br /></span>
    </div>
    </div>

    <div id="docs-main" class="has-toc">
    <div id="docs-main-inner">

                <div class="right" id="docs-version-nav">
            <a href="" id="docs-version-nav-toggle">version 8.0
            <span class="icon-chevron-down"></span></a>
            <div id="docs-version-list">
                                                                                            <a                         href="/doc/refman/5.7/en/mysqlbinlog.html">
                        5.7
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.6/en/mysqlbinlog.html">
                        5.6
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.5/en/mysqlbinlog.html">
                        5.5
                                            </a><br />
                                                                        <div id="docs-version-nav-lang">
                                                                                                                                                    <a                                     href="/doc/refman/5.6/ja/mysqlbinlog.html">
                                    5.6&nbsp;
                                                                            Japanese
                                                                    </a><br />
                                                                                            </div>
                            </div>
        </div>
        
        <div id="docs-show-nav" class="left hidden" style="margin-right: 15px;">
            <a class="docs-show-hide-nav" href="" aria-label="Show Sidebar"
                title="Show Sidebar"><span class="icon-arrow-small-right"></span></a>
        </div>

                        <div id="docs-breadcrumbs">
            <a href="/doc/refman/8.0/en/">MySQL 8.0 Reference Manual</a> &nbsp;/&nbsp;
                            <span id="breadcrumbs-link"><a href="" id="show-breadcrumbs">...</a> &nbsp;/&nbsp;</span>
                <span class="hidden" id="hidden-breadcrumbs">
                                                        <a href="programs.html">MySQL Programs</a> &nbsp;/&nbsp;
                                                            <a href="programs-admin-utils.html">MySQL Administrative and Utility Programs</a> &nbsp;/&nbsp;
                                                                                        </span>
                                        mysqlbinlog — Utility for Processing Binary Log Files
                                    </div>
        
        <div id="docs-body">
        
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="mysqlbinlog"></a>4.6.8 <span class="command"><strong>mysqlbinlog</strong></span> — Utility for Processing Binary Log Files</h3>

</div>

</div>

</div>
<div class="toc">
<p><small>[<a href="#" class="tocdetail" onclick="toggle('tocdetail-0'); return false;" onkeypress="if (event.keyCode == 13) { toggle('tocdetail-0'); return false;}">+/-</a>]</small></p>
<dl id="tocdetail-0"><dt><span class="section"><a href="mysqlbinlog-hexdump.html">4.6.8.1 mysqlbinlog Hex Dump Format</a></span></dt><dt><span class="section"><a href="mysqlbinlog-row-events.html">4.6.8.2 mysqlbinlog Row Event Display</a></span></dt><dt><span class="section"><a href="mysqlbinlog-backup.html">4.6.8.3 Using mysqlbinlog to Back Up Binary Log Files</a></span></dt><dt><span class="section"><a href="mysqlbinlog-server-id.html">4.6.8.4 Specifying the mysqlbinlog Server ID</a></span></dt></dl>
</div>
<a class="indexterm" name="idm139663279471856"></a><p>
        The server's binary log consists of files containing
        <span class="quote">“<span class="quote">events</span>”</span> that describe modifications to database
        contents. The server writes these files in binary format. To
        display their contents in text format, use the
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> utility. You can also use
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to display the contents of relay
        log files written by a slave server in a replication setup
        because relay logs have the same format as binary logs. The
        binary log and relay log are discussed further in
        <a class="xref" href="binary-log.html" title="5.4.4 The Binary Log">Section 5.4.4, “The Binary Log”</a>, and <a class="xref" href="slave-logs.html" title="17.2.4 Replication Relay and Status Logs">Section 17.2.4, “Replication Relay and Status Logs”</a>.
      </p><p>
        Invoke <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> like this:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqlbinlog [<em class="replaceable">options</em>] <em class="replaceable">log_file</em> ...</code></pre><p>
        For example, to display the contents of the binary log file
        named <code class="filename">binlog.000003</code>, use this command:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqlbinlog binlog.0000003</code></pre><p>
        The output includes events contained in
        <code class="filename">binlog.000003</code>. For statement-based logging,
        event information includes the SQL statement, the ID of the
        server on which it was executed, the timestamp when the
        statement was executed, how much time it took, and so forth. For
        row-based logging, the event indicates a row change rather than
        an SQL statement. See <a class="xref" href="replication-formats.html" title="17.2.1 Replication Formats">Section 17.2.1, “Replication Formats”</a>, for
        information about logging modes.
      </p><p>
        Events are preceded by header comments that provide additional
        information. For example:
      </p><pre class="programlisting copytoclipboard line-numbers language-none"><code class="language-none"># at 141
#100309  9:28:36 server id 123  end_log_pos 245
  Query thread_id=3350  exec_time=11  error_code=0</code></pre><p>
        In the first line, the number following <code class="literal">at</code>
        indicates the file offset, or starting position, of the event in
        the binary log file.
      </p><p>
        The second line starts with a date and time indicating when the
        statement started on the server where the event originated. For
        replication, this timestamp is propagated to slave servers.
        <code class="literal">server id</code> is the
        <a class="link" href="server-system-variables.html#sysvar_server_id"><code class="literal">server_id</code></a> value of the server
        where the event originated. <code class="literal">end_log_pos</code>
        indicates where the next event starts (that is, it is the end
        position of the current event + 1). <code class="literal">thread_id</code>
        indicates which thread executed the event.
        <code class="literal">exec_time</code> is the time spent executing the
        event, on a master server. On a slave, it is the difference of
        the end execution time on the slave minus the beginning
        execution time on the master. The difference serves as an
        indicator of how much replication lags behind the master.
        <code class="literal">error_code</code> indicates the result from
        executing the event. Zero means that no error occurred.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          When using event groups, the file offsets of events may be
          grouped together and the comments of events may be grouped
          together. Do not mistake these grouped events for blank file
          offsets.
</p>
</div>
<p>
        The output from <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> can be
        re-executed (for example, by using it as input to
        <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>) to redo the statements in the log.
        This is useful for recovery operations after a server crash. For
        other usage examples, see the discussion later in this section
        and in <a class="xref" href="point-in-time-recovery.html" title="7.5 Point-in-Time (Incremental) Recovery Using the Binary Log">Section 7.5, “Point-in-Time (Incremental) Recovery Using the Binary Log”</a>.
      </p><p>
        You can use <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to read binary log
        files directly and apply them to the local MySQL server. You can
        also read binary logs from a remote server by using the
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>
        option. To read remote binary logs, the connection parameter
        options can be given to indicate how to connect to the server.
        These options are <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_host"><code class="option">--host</code></a>,
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password"><code class="option">--password</code></a>,
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_port"><code class="option">--port</code></a>,
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_protocol"><code class="option">--protocol</code></a>,
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_socket"><code class="option">--socket</code></a>, and
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_user"><code class="option">--user</code></a>.
      </p><p>
        When binary log files have been encrypted, which can be done
        from MySQL 8.0.14 onwards, <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> cannot
        read them directly, but can read them from the server using the
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>
        option. Binary log files are encrypted when the server's
        <a class="link" href="replication-options-binary-log.html#sysvar_binlog_encryption"><code class="literal">binlog_encryption</code></a> system
        variable is set to <code class="literal">ON</code>. The
        <a class="link" href="show-binary-logs.html" title="13.7.6.1 SHOW BINARY LOGS Syntax"><code class="literal">SHOW BINARY LOGS</code></a> statement shows
        whether a particular binary log file is encrypted or
        unencrypted. Encrypted and unencrypted binary log files can also
        be distinguished using the magic number at the start of the file
        header for encrypted log files (<code class="literal">0xFD62696E</code>),
        which differs from that used for unencrypted log files
        (<code class="literal">0xFE62696E</code>). Note that from MySQL 8.0.14,
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> returns a suitable error if you
        attempt to read an encrypted binary log file directly, but older
        versions of <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> do not recognise the
        file as a binary log file at all. For more information on binary
        log encryption, see
        <a class="xref" href="replication-binlog-encryption.html" title="17.3.10 Encrypting Binary Log Files and Relay Log Files">Section 17.3.10, “Encrypting Binary Log Files and Relay Log Files”</a>.
      </p><p>
        When running <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> against a large
        binary log, be careful that the filesystem has enough space for
        the resulting files. To configure the directory that
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> uses for temporary files, use the
        <code class="literal">TMPDIR</code> environment variable.
      </p><p>
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> sets the value of
        <a class="link" href="server-system-variables.html#sysvar_pseudo_slave_mode"><code class="literal">pseudo_slave_mode</code></a> to true
        before executing any SQL statements.
      </p><p>
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> supports the following options,
        which can be specified on the command line or in the
        <code class="literal">[mysqlbinlog]</code> and <code class="literal">[client]</code>
        groups of an option file. For information about option files
        used by MySQL programs, see <a class="xref" href="option-files.html" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>.
</p>
<div class="table">
<a name="idm139663279409968"></a><p class="title"><b>Table 4.20 mysqlbinlog Options</b></p>
<div class="table-contents">
<table frame="box" rules="all" summary="Command-line options available for mysqlbinlog."><col width="27%"><col width="50%"><col width="11%"><col width="11%"><thead><tr><th scope="col">Option Name</th>
<th scope="col">Description</th>
<th scope="col">Introduced</th>
<th scope="col">Removed</th>
</tr></thead><tbody><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_base64-output">--base64-output</a></td>
<td>Print binary log entries using base-64 encoding</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_bind-address">--bind-address</a></td>
<td>Use specified network interface to connect to MySQL Server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_binlog-row-event-max-size">--binlog-row-event-max-size</a></td>
<td>Binary log max event size</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_character-sets-dir">--character-sets-dir</a></td>
<td>Directory where character sets are installed</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_compress">--compress</a></td>
<td>Compress all information sent between client and server</td>
<td>8.0.17</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_connection-server-id">--connection-server-id</a></td>
<td>Used for testing and debugging. See text for applicable default values and other particulars.</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database">--database</a></td>
<td>List entries for just this database</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_debug">--debug</a></td>
<td>Write debugging log</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_debug-check">--debug-check</a></td>
<td>Print debugging information when program exits</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_debug-info">--debug-info</a></td>
<td>Print debugging information, memory, and CPU statistics when program exits</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_default-auth">--default-auth</a></td>
<td>Authentication plugin to use</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-extra-file">--defaults-extra-file</a></td>
<td>Read named option file in addition to usual option files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-file">--defaults-file</a></td>
<td>Read only named option file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-group-suffix">--defaults-group-suffix</a></td>
<td>Option group suffix value</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_disable-log-bin">--disable-log-bin</a></td>
<td>Disable binary logging</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_exclude-gtids">--exclude-gtids</a></td>
<td>Do not show any of the groups in the GTID set provided</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_force-if-open">--force-if-open</a></td>
<td>Read binary log files even if open or not closed properly</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_force-read">--force-read</a></td>
<td>If mysqlbinlog reads a binary log event that it does not recognize, it prints a warning</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_get-server-public-key">--get-server-public-key</a></td>
<td>Request RSA public key from server</td>
<td>8.0.3</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_help">--help</a></td>
<td>Display help message and exit</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_hexdump">--hexdump</a></td>
<td>Display a hex dump of the log in comments</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_host">--host</a></td>
<td>Connect to MySQL server on given host</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_idempotent">--idempotent</a></td>
<td>Cause the server to use idempotent mode while processing binary log updates from this session only</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_include-gtids">--include-gtids</a></td>
<td>Show only the groups in the GTID set provided</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_local-load">--local-load</a></td>
<td>Prepare local temporary files for LOAD DATA in the specified directory</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_login-path">--login-path</a></td>
<td>Read login path options from .mylogin.cnf</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_no-defaults">--no-defaults</a></td>
<td>Read no option files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_offset">--offset</a></td>
<td>Skip the first N entries in the log</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password">--password</a></td>
<td>Password to use when connecting to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_plugin-dir">--plugin-dir</a></td>
<td>Directory where plugins are installed</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_port">--port</a></td>
<td>TCP/IP port number for connection</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_print-defaults">--print-defaults</a></td>
<td>Print default options</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_print-table-metadata">--print-table-metadata</a></td>
<td>Print table metadata</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_protocol">--protocol</a></td>
<td>Connection protocol to use</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw">--raw</a></td>
<td>Write events in raw (binary) format to output files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-master">--read-from-remote-master</a></td>
<td>Read the binary log from a MySQL master rather than reading a local log file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server">--read-from-remote-server</a></td>
<td>Read binary log from MySQL server rather than local log file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_result-file">--result-file</a></td>
<td>Direct output to named file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_rewrite-db">--rewrite-db</a></td>
<td>Create rewrite rules for databases when playing back from logs written in row-based format. Can be used multiple times.</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_secure-auth">--secure-auth</a></td>
<td>Do not send passwords to server in old (pre-4.1) format</td>
<td></td>
<td>8.0.3</td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-id">--server-id</a></td>
<td>Extract only those events created by the server having the given server ID</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-id-bits">--server-id-bits</a></td>
<td>Tell mysqlbinlog how to interpret server IDs in binary log when log was written by a mysqld having its server-id-bits set to less than the maximum; supported only by MySQL Cluster version of mysqlbinlog</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-public-key-path">--server-public-key-path</a></td>
<td>Path name to file containing RSA public key</td>
<td>8.0.4</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_set-charset">--set-charset</a></td>
<td>Add a SET NAMES charset_name statement to the output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_shared-memory-base-name">--shared-memory-base-name</a></td>
<td>Name of shared memory to use for shared-memory connections</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_short-form">--short-form</a></td>
<td>Display only the statements contained in the log</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_skip-gtids">--skip-gtids</a></td>
<td>Do not print any GTIDs; use this when writing a dump file from binary logs containing GTIDs.</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_socket">--socket</a></td>
<td>The Unix socket file or Windows named pipe to use</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-ca</a></td>
<td>File that contains list of trusted SSL Certificate Authorities</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-capath</a></td>
<td>Directory that contains trusted SSL Certificate Authority certificate files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-cert</a></td>
<td>File that contains X.509 certificate</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-cipher</a></td>
<td>Permissible ciphers for connection encryption</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-crl</a></td>
<td>File that contains certificate revocation lists</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-crlpath</a></td>
<td>Directory that contains certificate revocation-list files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl-fips-mode">--ssl-fips-mode</a></td>
<td>Whether to enable FIPS mode on client side</td>
<td>8.0.11</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-key</a></td>
<td>File that contains X.509 key</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl">--ssl-mode</a></td>
<td>Desired security state of connection to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_start-datetime">--start-datetime</a></td>
<td>Read binary log from first event with timestamp equal to or later than datetime argument</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_start-position">--start-position</a></td>
<td>Read binary log from first event with position equal to or greater than argument</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-datetime">--stop-datetime</a></td>
<td>Stop reading binary log at first event with timestamp equal to or greater than datetime argument</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never">--stop-never</a></td>
<td>Stay connected to server after reading last binary log file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never-slave-server-id">--stop-never-slave-server-id</a></td>
<td>Slave server ID to report when connecting to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-position">--stop-position</a></td>
<td>Stop reading binary log at first event with position equal to or greater than argument</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_tls-ciphersuites">--tls-ciphersuites</a></td>
<td>Permissible TLSv1.3 ciphersuites for encrypted connections</td>
<td>8.0.16</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_tls-version">--tls-version</a></td>
<td>Permissible TLS protocols for encrypted connections</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_to-last-log">--to-last-log</a></td>
<td>Do not stop at the end of requested binary log from a MySQL server, but rather continue printing to end of last binary log</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_user">--user</a></td>
<td>MySQL user name to use when connecting to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verbose">--verbose</a></td>
<td>Reconstruct row events as SQL statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verify-binlog-checksum">--verify-binlog-checksum</a></td>
<td>Verify checksums in binary log</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqlbinlog.html#option_mysqlbinlog_version">--version</a></td>
<td>Display version information and exit</td>
<td></td>
<td></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqlbinlog_help"></a>
            <a class="indexterm" name="idm139663279085152"></a>

            <a class="indexterm" name="idm139663279083696"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_help"><code class="option">--help</code></a>,
            <code class="option">-?</code>
          </p><p>
            Display a help message and exit.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_base64-output"></a>
            <a class="indexterm" name="idm139663279079184"></a>

            <a class="indexterm" name="idm139663279077696"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_base64-output"><code class="option">--base64-output=<em class="replaceable"><code>value</code></em></code></a>
          </p><p>
            This option determines when events should be displayed
            encoded as base-64 strings using
            <a class="link" href="binlog.html" title="13.7.7.1 BINLOG Syntax"><code class="literal">BINLOG</code></a> statements. The option
            has these permissible values (not case-sensitive):
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">AUTO</code> ("automatic") or
                <code class="literal">UNSPEC</code> ("unspecified") displays
                <a class="link" href="binlog.html" title="13.7.7.1 BINLOG Syntax"><code class="literal">BINLOG</code></a> statements
                automatically when necessary (that is, for format
                description events and row events). If no
                <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_base64-output"><code class="option">--base64-output</code></a>
                option is given, the effect is the same as
                <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_base64-output"><code class="option">--base64-output=AUTO</code></a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
                  Automatic <a class="link" href="binlog.html" title="13.7.7.1 BINLOG Syntax"><code class="literal">BINLOG</code></a>
                  display is the only safe behavior if you intend to use
                  the output of <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to
                  re-execute binary log file contents. The other option
                  values are intended only for debugging or testing
                  purposes because they may produce output that does not
                  include all events in executable form.
</p>
</div>
</li><li class="listitem"><p>
                <code class="literal">NEVER</code> causes
                <a class="link" href="binlog.html" title="13.7.7.1 BINLOG Syntax"><code class="literal">BINLOG</code></a> statements not to
                be displayed. <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> exits with
                an error if a row event is found that must be displayed
                using <a class="link" href="binlog.html" title="13.7.7.1 BINLOG Syntax"><code class="literal">BINLOG</code></a>.
              </p></li><li class="listitem"><p>
                <code class="literal">DECODE-ROWS</code> specifies to
                <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> that you intend for row
                events to be decoded and displayed as commented SQL
                statements by also specifying the
                <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verbose"><code class="option">--verbose</code></a> option.
                Like <code class="literal">NEVER</code>,
                <code class="literal">DECODE-ROWS</code> suppresses display of
                <a class="link" href="binlog.html" title="13.7.7.1 BINLOG Syntax"><code class="literal">BINLOG</code></a> statements, but
                unlike <code class="literal">NEVER</code>, it does not exit with
                an error if a row event is found.
</p></li></ul>
</div>
<p>
            For examples that show the effect of
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_base64-output"><code class="option">--base64-output</code></a> and
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verbose"><code class="option">--verbose</code></a> on row event
            output, see <a class="xref" href="mysqlbinlog-row-events.html" title="4.6.8.2 mysqlbinlog Row Event Display">Section 4.6.8.2, “mysqlbinlog Row Event Display”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_bind-address"></a>
            <a class="indexterm" name="idm139663279046080"></a>

            <a class="indexterm" name="idm139663279044592"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_bind-address"><code class="option">--bind-address=<em class="replaceable"><code>ip_address</code></em></code></a>
          </p><p>
            On a computer having multiple network interfaces, use this
            option to select which interface to use for connecting to
            the MySQL server.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_binlog-row-event-max-size"></a>
            <a class="indexterm" name="idm139663279039952"></a>

            <a class="indexterm" name="idm139663279038496"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_binlog-row-event-max-size"><code class="option">--binlog-row-event-max-size=<em class="replaceable"><code>N</code></em></code></a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for binlog-row-event-max-size"><col width="30%"><col width="70%"><thead><tr><th scope="col">Property</th>
<th scope="col">Value</th>
</tr></thead><tbody><tr><td scope="row"><span class="bold"><strong>Command-Line Format</strong></span></td>
<td><code class="literal">--binlog-row-event-max-size=#</code></td>
</tr><tr><td scope="row"><span class="bold"><strong>Type</strong></span></td>
<td>Numeric</td>
</tr><tr><td scope="row"><span class="bold"><strong>Default Value</strong></span></td>
<td><code class="literal">4294967040</code></td>
</tr><tr><td scope="row"><span class="bold"><strong>Minimum Value</strong></span></td>
<td><code class="literal">256</code></td>
</tr><tr><td scope="row"><span class="bold"><strong>Maximum Value</strong></span></td>
<td><code class="literal">18446744073709547520</code></td>
</tr></tbody></table>
</div>
<p>
            Specify the maximum size of a row-based binary log event, in
            bytes. Rows are grouped into events smaller than this size
            if possible. The value should be a multiple of 256. The
            default is 4GB.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_character-sets-dir"></a>
            <a class="indexterm" name="idm139663279012848"></a>

            <a class="indexterm" name="idm139663279011392"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_character-sets-dir"><code class="option">--character-sets-dir=<em class="replaceable"><code>dir_name</code></em></code></a>
          </p><p>
            The directory where character sets are installed. See
            <a class="xref" href="charset-configuration.html" title="10.14 Character Set Configuration">Section 10.14, “Character Set Configuration”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_compress"></a>
            <a class="indexterm" name="idm139663279006272"></a>

            <a class="indexterm" name="idm139663279004784"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_compress"><code class="option">--compress</code></a>
          </p><p>
            Compress all information sent between the client and the
            server if possible. See
            <a class="xref" href="connection-compression-control.html" title="4.2.6 Connection Compression Control">Section 4.2.6, “Connection Compression Control”</a>.
          </p><p>
            This option was added in MySQL 8.0.17.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_connection-server-id"></a>
            <a class="indexterm" name="idm139663278999424"></a>

            <a class="indexterm" name="idm139663278997968"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_connection-server-id"><code class="option">--connection-server-id=<em class="replaceable"><code>server_id</code></em></code></a>
          </p><p>
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_connection-server-id"><code class="option">--connection-server-id</code></a>
            specifies the server ID that <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a>
            reports when it connects to the server. It can be used to
            avoid a conflict with the ID of a slave server or another
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> process.
          </p><p>
            If the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>
            option is specified, <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> reports
            a server ID of 0, which tells the server to disconnect after
            sending the last log file (nonblocking behavior). If the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never"><code class="option">--stop-never</code></a> option is
            also specified to maintain the connection to the server,
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> reports a server ID of 1 by
            default instead of 0, and
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_connection-server-id"><code class="option">--connection-server-id</code></a>
            can be used to replace that server ID if required. See
            <a class="xref" href="mysqlbinlog-server-id.html" title="4.6.8.4 Specifying the mysqlbinlog Server ID">Section 4.6.8.4, “Specifying the mysqlbinlog Server ID”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_database"></a>
            <a class="indexterm" name="idm139663278982848"></a>

            <a class="indexterm" name="idm139663278981360"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database"><code class="option">--database=<em class="replaceable"><code>db_name</code></em></code></a>,
            <code class="option">-d <em class="replaceable"><code>db_name</code></em></code>
          </p><p>
            This option causes <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to output
            entries from the binary log (local log only) that occur
            while <em class="replaceable"><code>db_name</code></em> is been selected as
            the default database by <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE</code></a>.
          </p><p>
            The <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database"><code class="option">--database</code></a> option
            for <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> is similar to the
            <a class="link" href="replication-options-binary-log.html#option_mysqld_binlog-do-db"><code class="option">--binlog-do-db</code></a> option for
            <a class="link" href="mysqld.html" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>, but can be used to specify only
            one database. If
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database"><code class="option">--database</code></a> is given
            multiple times, only the last instance is used.
          </p><p>
            The effects of this option depend on whether the
            statement-based or row-based logging format is in use, in
            the same way that the effects of
            <a class="link" href="replication-options-binary-log.html#option_mysqld_binlog-do-db"><code class="option">--binlog-do-db</code></a> depend on
            whether statement-based or row-based logging is in use.
          </p><p><b>Statement-based logging. </b>
              The <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database"><code class="option">--database</code></a> option
              works as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                While <em class="replaceable"><code>db_name</code></em> is the default
                database, statements are output whether they modify
                tables in <em class="replaceable"><code>db_name</code></em> or a
                different database.
              </p></li><li class="listitem"><p>
                Unless <em class="replaceable"><code>db_name</code></em> is selected as
                the default database, statements are not output, even if
                they modify tables in
                <em class="replaceable"><code>db_name</code></em>.
              </p></li><li class="listitem"><p>
                There is an exception for <a class="link" href="create-database.html" title="13.1.12 CREATE DATABASE Syntax"><code class="literal">CREATE
                DATABASE</code></a>, <a class="link" href="alter-database.html" title="13.1.2 ALTER DATABASE Syntax"><code class="literal">ALTER
                DATABASE</code></a>, and <a class="link" href="drop-database.html" title="13.1.24 DROP DATABASE Syntax"><code class="literal">DROP
                DATABASE</code></a>. The database being
                <span class="emphasis"><em>created, altered, or dropped</em></span> is
                considered to be the default database when determining
                whether to output the statement.
</p></li></ul>
</div>
<p>
            Suppose that the binary log was created by executing these
            statements using statement-based-logging:
          </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">INSERT INTO test.t1 (i) VALUES(100);
INSERT INTO db2.t2 (j)  VALUES(200);
USE test;
INSERT INTO test.t1 (i) VALUES(101);
INSERT INTO t1 (i)      VALUES(102);
INSERT INTO db2.t2 (j)  VALUES(201);
USE db2;
INSERT INTO test.t1 (i) VALUES(103);
INSERT INTO db2.t2 (j)  VALUES(202);
INSERT INTO t2 (j)      VALUES(203);</code></pre><p>
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog --database=test</strong></span></a> does not
            output the first two <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
            statements because there is no default database. It outputs
            the three <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements
            following <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE
            test</code></a>, but not the three
            <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements following
            <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE db2</code></a>.
          </p><p>
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog --database=db2</strong></span></a> does not
            output the first two <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
            statements because there is no default database. It does not
            output the three <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
            statements following
            <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE test</code></a>, but
            does output the three <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
            statements following
            <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE db2</code></a>.
          </p><p><b>Row-based logging. </b>
              <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> outputs only entries that
              change tables belonging to
              <em class="replaceable"><code>db_name</code></em>. The default database
              has no effect on this. Suppose that the binary log just
              described was created using row-based logging rather than
              statement-based logging. <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog
              --database=test</strong></span></a> outputs only those entries that
              modify <code class="literal">t1</code> in the test database,
              regardless of whether <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE</code></a>
              was issued or what the default database is.
            </p><p>
            If a server is running with
            <a class="link" href="replication-options-binary-log.html#sysvar_binlog_format"><code class="literal">binlog_format</code></a> set to
            <code class="literal">MIXED</code> and you want it to be possible to
            use <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> with the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database"><code class="option">--database</code></a> option, you
            must ensure that tables that are modified are in the
            database selected by <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE</code></a>. (In
            particular, no cross-database updates should be used.)
          </p><p>
            When used together with the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_rewrite-db"><code class="option">--rewrite-db</code></a> option, the
            <code class="option">--rewrite-db</code> option is applied first; then
            the <code class="option">--database</code> option is applied, using the
            rewritten database name. The order in which the options are
            provided makes no difference in this regard.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_debug"></a>
            <a class="indexterm" name="idm139663278921360"></a>

            <a class="indexterm" name="idm139663278919872"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_debug"><code class="option">--debug[=<em class="replaceable"><code>debug_options</code></em>]</code></a>,
            <code class="option">-#
            [<em class="replaceable"><code>debug_options</code></em>]</code>
          </p><p>
            Write a debugging log. A typical
            <em class="replaceable"><code>debug_options</code></em> string is
            <code class="literal">d:t:o,<em class="replaceable"><code>file_name</code></em></code>.
            The default is
            <code class="literal">d:t:o,/tmp/mysqlbinlog.trace</code>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_debug-check"></a>
            <a class="indexterm" name="idm139663278912224"></a>

            <a class="indexterm" name="idm139663278910736"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_debug-check"><code class="option">--debug-check</code></a>
          </p><p>
            Print some debugging information when the program exits.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_debug-info"></a>
            <a class="indexterm" name="idm139663278906576"></a>

            <a class="indexterm" name="idm139663278905088"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_debug-info"><code class="option">--debug-info</code></a>
          </p><p>
            Print debugging information and memory and CPU usage
            statistics when the program exits.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_default-auth"></a>
            <a class="indexterm" name="idm139663278900880"></a>

            <a class="indexterm" name="idm139663278899392"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_default-auth"><code class="option">--default-auth=<em class="replaceable"><code>plugin</code></em></code></a>
          </p><p>
            A hint about which client-side authentication plugin to use.
            See <a class="xref" href="pluggable-authentication.html" title="6.2.17 Pluggable Authentication">Section 6.2.17, “Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_defaults-extra-file"></a>
            <a class="indexterm" name="idm139663278894224"></a>

            <a class="indexterm" name="idm139663278892768"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-extra-file"><code class="option">--defaults-extra-file=<em class="replaceable"><code>file_name</code></em></code></a>
          </p><p>
            Read this option file after the global option file but (on
            Unix) before the user option file. If the file does not
            exist or is otherwise inaccessible, an error occurs.
            <em class="replaceable"><code>file_name</code></em> is interpreted relative
            to the current directory if given as a relative path name
            rather than a full path name.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_defaults-file"></a>
            <a class="indexterm" name="idm139663278886368"></a>

            <a class="indexterm" name="idm139663278884880"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-file"><code class="option">--defaults-file=<em class="replaceable"><code>file_name</code></em></code></a>
          </p><p>
            Use only the given option file. If the file does not exist
            or is otherwise inaccessible, an error occurs.
            <em class="replaceable"><code>file_name</code></em> is interpreted relative
            to the current directory if given as a relative path name
            rather than a full path name.
          </p><p>
            Exception: Even with
            <a class="link" href="option-file-options.html#option_general_defaults-file"><code class="option">--defaults-file</code></a>, client
            programs read <code class="filename">.mylogin.cnf</code>.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_defaults-group-suffix"></a>
            <a class="indexterm" name="idm139663278876400"></a>

            <a class="indexterm" name="idm139663278874896"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-group-suffix"><code class="option">--defaults-group-suffix=<em class="replaceable"><code>str</code></em></code></a>
          </p><p>
            Read not only the usual option groups, but also groups with
            the usual names and a suffix of
            <em class="replaceable"><code>str</code></em>. For example,
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> normally reads the
            <code class="literal">[client]</code> and
            <code class="literal">[mysqlbinlog]</code> groups. If the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_defaults-group-suffix"><code class="option">--defaults-group-suffix=_other</code></a>
            option is given, <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> also reads
            the <code class="literal">[client_other]</code> and
            <code class="literal">[mysqlbinlog_other]</code> groups.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_disable-log-bin"></a>
            <a class="indexterm" name="idm139663278862400"></a>

            <a class="indexterm" name="idm139663278860912"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_disable-log-bin"><code class="option">--disable-log-bin</code></a>,
            <code class="option">-D</code>
          </p><p>
            Disable binary logging. This is useful for avoiding an
            endless loop if you use the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_to-last-log"><code class="option">--to-last-log</code></a> option and
            are sending the output to the same MySQL server. This option
            also is useful when restoring after a crash to avoid
            duplication of the statements you have logged.
          </p><p>
            This option causes <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to include
            a <a class="link" href="set-sql-log-bin.html" title="13.4.1.3 SET sql_log_bin Syntax"><code class="literal">SET
            sql_log_bin = 0</code></a> statement in its output to disable
            binary logging of the remaining output. Manipulating the
            session value of the
            <a class="link" href="replication-options-binary-log.html#sysvar_sql_log_bin"><code class="literal">sql_log_bin</code></a> system variable
            is a restricted operation, so this option requires that you
            have privileges sufficient to set restricted session
            variables. See <a class="xref" href="system-variable-privileges.html" title="5.1.9.1 System Variable Privileges">Section 5.1.9.1, “System Variable Privileges”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_exclude-gtids"></a>
            <a class="indexterm" name="idm139663278849760"></a>

            <a class="indexterm" name="idm139663278848272"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_exclude-gtids"><code class="option">--exclude-gtids=<em class="replaceable"><code>gtid_set</code></em></code></a>
          </p><p>
            Do not display any of the groups listed in the
            <em class="replaceable"><code>gtid_set</code></em>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_force-if-open"></a>
            <a class="indexterm" name="idm139663278843376"></a>

            <a class="indexterm" name="idm139663278841888"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_force-if-open"><code class="option">--force-if-open</code></a>,
            <code class="option">-F</code>
          </p><p>
            Read binary log files even if they are open or were not
            closed properly.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_force-read"></a>
            <a class="indexterm" name="idm139663278837328"></a>

            <a class="indexterm" name="idm139663278835840"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_force-read"><code class="option">--force-read</code></a>,
            <code class="option">-f</code>
          </p><p>
            With this option, if <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> reads a
            binary log event that it does not recognize, it prints a
            warning, ignores the event, and continues. Without this
            option, <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> stops if it reads
            such an event.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_get-server-public-key"></a>
            <a class="indexterm" name="idm139663278828608"></a>

            <a class="indexterm" name="idm139663278827104"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_get-server-public-key"><code class="option">--get-server-public-key</code></a>
          </p><p>
            Request from the server the public key required for RSA key
            pair-based password exchange. This option applies to clients
            that authenticate with the
            <code class="literal">caching_sha2_password</code> authentication
            plugin. For that plugin, the server does not send the public
            key unless requested. This option is ignored for accounts
            that do not authenticate with that plugin. It is also
            ignored if RSA-based password exchange is not used, as is
            the case when the client connects to the server using a
            secure connection.
          </p><p>
            If
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-public-key-path"><code class="option">--server-public-key-path=<em class="replaceable"><code>file_name</code></em></code></a>
            is given and specifies a valid public key file, it takes
            precedence over
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_get-server-public-key"><code class="option">--get-server-public-key</code></a>.
          </p><p>
            For information about the
            <code class="literal">caching_sha2_password</code> plugin, see
            <a class="xref" href="caching-sha2-pluggable-authentication.html" title="6.4.1.3 Caching SHA-2 Pluggable Authentication">Section 6.4.1.3, “Caching SHA-2 Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_hexdump"></a>
            <a class="indexterm" name="idm139663278816928"></a>

            <a class="indexterm" name="idm139663278815440"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_hexdump"><code class="option">--hexdump</code></a>,
            <code class="option">-H</code>
          </p><p>
            Display a hex dump of the log in comments, as described in
            <a class="xref" href="mysqlbinlog-hexdump.html" title="4.6.8.1 mysqlbinlog Hex Dump Format">Section 4.6.8.1, “mysqlbinlog Hex Dump Format”</a>. The hex output can be
            helpful for replication debugging.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_host"></a>
            <a class="indexterm" name="idm139663278810176"></a>

            <a class="indexterm" name="idm139663278808720"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_host"><code class="option">--host=<em class="replaceable"><code>host_name</code></em></code></a>,
            <code class="option">-h <em class="replaceable"><code>host_name</code></em></code>
          </p><p>
            Get the binary log from the MySQL server on the given host.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_idempotent"></a>
            <a class="indexterm" name="idm139663278803616"></a>

            <a class="indexterm" name="idm139663278802128"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_idempotent"><code class="option">--idempotent</code></a>
          </p><p>
            Tell the MySQL Server to use idempotent mode while
            processing updates; this causes suppression of any
            duplicate-key or key-not-found errors that the server
            encounters in the current session while processing updates.
            This option may prove useful whenever it is desirable or
            necessary to replay one or more binary logs to a MySQL
            Server which may not contain all of the data to which the
            logs refer.
          </p><p>
            The scope of effect for this option includes the current
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> client and session only.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_include-gtids"></a>
            <a class="indexterm" name="idm139663278795808"></a>

            <a class="indexterm" name="idm139663278794320"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_include-gtids"><code class="option">--include-gtids=<em class="replaceable"><code>gtid_set</code></em></code></a>
          </p><p>
            Display only the groups listed in the
            <em class="replaceable"><code>gtid_set</code></em>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_local-load"></a>
            <a class="indexterm" name="idm139663278789504"></a>

            <a class="indexterm" name="idm139663278788016"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_local-load"><code class="option">--local-load=<em class="replaceable"><code>dir_name</code></em></code></a>,
            <code class="option">-l <em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Prepare local temporary files for <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
            DATA</code></a> in the specified directory.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
              These temporary files are not automatically removed by
              <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> or any other MySQL program.
</p>
</div>
</li><li class="listitem"><p><a name="option_mysqlbinlog_login-path"></a>
            <a class="indexterm" name="idm139663278779536"></a>

            <a class="indexterm" name="idm139663278778048"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_login-path"><code class="option">--login-path=<em class="replaceable"><code>name</code></em></code></a>
          </p><p>
            Read options from the named login path in the
            <code class="filename">.mylogin.cnf</code> login path file. A
            <span class="quote">“<span class="quote">login path</span>”</span> is an option group containing
            options that specify which MySQL server to connect to and
            which account to authenticate as. To create or modify a
            login path file, use the
            <a class="link" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility"><span class="command"><strong>mysql_config_editor</strong></span></a> utility. See
            <a class="xref" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility">Section 4.6.7, “<span class="command"><strong>mysql_config_editor</strong></span> — MySQL Configuration Utility”</a>.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_no-defaults"></a>
            <a class="indexterm" name="idm139663278769200"></a>

            <a class="indexterm" name="idm139663278767712"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_no-defaults"><code class="option">--no-defaults</code></a>
          </p><p>
            Do not read any option files. If program startup fails due
            to reading unknown options from an option file,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_no-defaults"><code class="option">--no-defaults</code></a> can be
            used to prevent them from being read.
          </p><p>
            The exception is that the <code class="filename">.mylogin.cnf</code>
            file, if it exists, is read in all cases. This permits
            passwords to be specified in a safer way than on the command
            line even when
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_no-defaults"><code class="option">--no-defaults</code></a> is used.
            (<code class="filename">.mylogin.cnf</code> is created by the
            <a class="link" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility"><span class="command"><strong>mysql_config_editor</strong></span></a> utility. See
            <a class="xref" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility">Section 4.6.7, “<span class="command"><strong>mysql_config_editor</strong></span> — MySQL Configuration Utility”</a>.)
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_offset"></a>
            <a class="indexterm" name="idm139663278756320"></a>

            <a class="indexterm" name="idm139663278754832"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_offset"><code class="option">--offset=<em class="replaceable"><code>N</code></em></code></a>,
            <code class="option">-o <em class="replaceable"><code>N</code></em></code>
          </p><p>
            Skip the first <em class="replaceable"><code>N</code></em> entries in the
            log.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_open-files-limit"></a>
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_open-files-limit"><code class="option">--open-files-limit=<em class="replaceable"><code>N</code></em></code></a>
          </p><a class="indexterm" name="idm139663278747888"></a><a class="indexterm" name="idm139663278746400"></a><p>
            Specify the number of open file descriptors to reserve.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_password"></a>
            <a class="indexterm" name="idm139663278743328"></a>

            <a class="indexterm" name="idm139663278741840"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password"><code class="option">--password[=<em class="replaceable"><code>password</code></em>]</code></a>,
            <code class="option">-p[<em class="replaceable"><code>password</code></em>]</code>
          </p><p>
            The password of the MySQL account used for connecting to the
            server. The password value is optional. If not given,
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> prompts for one. If given,
            there must be <span class="emphasis"><em>no space</em></span> between
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password"><code class="option">--password=</code></a> or
            <code class="option">-p</code> and the password following it. If no
            password option is specified, the default is to send no
            password.
          </p><p>
            Specifying a password on the command line should be
            considered insecure. To avoid giving the password on the
            command line, use an option file. See
            <a class="xref" href="password-security-user.html" title="6.1.2.1 End-User Guidelines for Password Security">Section 6.1.2.1, “End-User Guidelines for Password Security”</a>.
          </p><p>
            To explicitly specify that there is no password and that
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> should not prompt for one,
            use the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password"><code class="option">--skip-password</code></a>
            option.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_plugin-dir"></a>
            <a class="indexterm" name="idm139663278729136"></a>

            <a class="indexterm" name="idm139663278727648"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_plugin-dir"><code class="option">--plugin-dir=<em class="replaceable"><code>dir_name</code></em></code></a>
          </p><p>
            The directory in which to look for plugins. Specify this
            option if the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_default-auth"><code class="option">--default-auth</code></a> option is
            used to specify an authentication plugin but
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> does not find it. See
            <a class="xref" href="pluggable-authentication.html" title="6.2.17 Pluggable Authentication">Section 6.2.17, “Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_port"></a>
            <a class="indexterm" name="idm139663278720160"></a>

            <a class="indexterm" name="idm139663278718704"></a>

            <a class="indexterm" name="idm139663278717216"></a>

            <a class="indexterm" name="idm139663278716144"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_port"><code class="option">--port=<em class="replaceable"><code>port_num</code></em></code></a>,
            <code class="option">-P <em class="replaceable"><code>port_num</code></em></code>
          </p><p>
            The TCP/IP port number to use for connecting to a remote
            server.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_print-defaults"></a>
            <a class="indexterm" name="idm139663278711488"></a>

            <a class="indexterm" name="idm139663278710000"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_print-defaults"><code class="option">--print-defaults</code></a>
          </p><p>
            Print the program name and all options that it gets from
            option files.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_print-table-metadata"></a>
            <a class="indexterm" name="idm139663278704624"></a>

            <a class="indexterm" name="idm139663278703168"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_print-table-metadata"><code class="option">--print-table-metadata</code></a>
          </p><p>
            Print table related metadata from the binary log. Configure
            the amount of table related metadata binary logged using
            <a class="link" href="replication-options-binary-log.html#sysvar_binlog_row_metadata"><code class="literal">binlog-row-metadata</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_protocol"></a>
            <a class="indexterm" name="idm139663278697600"></a>

            <a class="indexterm" name="idm139663278696112"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_protocol"><code class="option">--protocol={TCP|SOCKET|PIPE|MEMORY}</code></a>
          </p><p>
            The connection protocol to use for connecting to the server.
            It is useful when the other connection parameters normally
            result in use of a protocol other than the one you want. For
            details on the permissible values, see
            <a class="xref" href="connecting.html" title="4.2.4 Connecting to the MySQL Server Using Command Options">Section 4.2.4, “Connecting to the MySQL Server Using Command Options”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_raw"></a>
            <a class="indexterm" name="idm139663278691104"></a>

            <a class="indexterm" name="idm139663278689648"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a>
          </p><p>
            By default, <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> reads binary log
            files and writes events in text format. The
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a> option tells
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to write them in their
            original binary format. Its use requires that
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>
            also be used because the files are requested from a server.
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> writes one output file for
            each file read from the server. The
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a> option can be used
            to make a backup of a server's binary log. With the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never"><code class="option">--stop-never</code></a> option, the
            backup is <span class="quote">“<span class="quote">live</span>”</span> because
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> stays connected to the
            server. By default, output files are written in the current
            directory with the same names as the original log files.
            Output file names can be modified using the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_result-file"><code class="option">--result-file</code></a> option.
            For more information, see
            <a class="xref" href="mysqlbinlog-backup.html" title="4.6.8.3 Using mysqlbinlog to Back Up Binary Log Files">Section 4.6.8.3, “Using mysqlbinlog to Back Up Binary Log Files”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_read-from-remote-master"></a>
            <a class="indexterm" name="idm139663278673760"></a>

            <a class="indexterm" name="idm139663278672256"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-master"><code class="option">--read-from-remote-master=<em class="replaceable"><code>type</code></em></code></a>
          </p><p>
            Read binary logs from a MySQL server with the
            <code class="literal">COM_BINLOG_DUMP</code> or
            <code class="literal">COM_BINLOG_DUMP_GTID</code> commands by setting
            the option value to either
            <code class="literal">BINLOG-DUMP-NON-GTIDS</code> or
            <code class="literal">BINLOG-DUMP-GTIDS</code>, respectively. If
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-master"><code class="option">--read-from-remote-master=BINLOG-DUMP-GTIDS</code></a>
            is combined with
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_exclude-gtids"><code class="option">--exclude-gtids</code></a>,
            transactions can be filtered out on the master, avoiding
            unnecessary network traffic.
          </p><p>
            The connection parameter options are used with this option
            or the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>
            option. These options are
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_host"><code class="option">--host</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password"><code class="option">--password</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_port"><code class="option">--port</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_protocol"><code class="option">--protocol</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_socket"><code class="option">--socket</code></a>, and
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_user"><code class="option">--user</code></a>. If neither of
            the remote options is specified, the connection parameter
            options are ignored.
          </p><p>
            The <a class="link" href="privileges-provided.html#priv_replication-slave"><code class="literal">REPLICATION SLAVE</code></a>
            privilege is required to use this option.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_read-from-remote-server"></a>
            <a class="indexterm" name="idm139663278653344"></a>

            <a class="indexterm" name="idm139663278651840"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>,
            <code class="option">-R</code>
          </p><p>
            Read the binary log from a MySQL server rather than reading
            a local log file. This option requires that the remote
            server be running. It works only for binary log files on the
            remote server, not relay log files.
          </p><p>
            The connection parameter options are used with this option
            or the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-master"><code class="option">--read-from-remote-master</code></a>
            option. These options are
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_host"><code class="option">--host</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_password"><code class="option">--password</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_port"><code class="option">--port</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_protocol"><code class="option">--protocol</code></a>,
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_socket"><code class="option">--socket</code></a>, and
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_user"><code class="option">--user</code></a>. If neither of
            the remote options is specified, the connection parameter
            options are ignored.
          </p><p>
            The <a class="link" href="privileges-provided.html#priv_replication-slave"><code class="literal">REPLICATION SLAVE</code></a>
            privilege is required to use this option.
          </p><p>
            This option is like
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-master"><code class="option">--read-from-remote-master=BINLOG-DUMP-NON-GTIDS</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_result-file"></a>
            <a class="indexterm" name="idm139663278636352"></a>

            <a class="indexterm" name="idm139663278634864"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_result-file"><code class="option">--result-file=<em class="replaceable"><code>name</code></em></code></a>,
            <code class="option">-r <em class="replaceable"><code>name</code></em></code>
          </p><p>
            Without the <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a>
            option, this option indicates the file to which
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> writes text output. With
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a>,
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> writes one binary output file
            for each log file transferred from the server, writing them
            by default in the current directory using the same names as
            the original log file. In this case, the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_result-file"><code class="option">--result-file</code></a> option
            value is treated as a prefix that modifies output file
            names.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_rewrite-db"></a>
            <a class="indexterm" name="idm139663278624048"></a>

            <a class="indexterm" name="idm139663278622560"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_rewrite-db"><code class="option">--rewrite-db='<em class="replaceable"><code>from_name</code></em>-&gt;<em class="replaceable"><code>to_name</code></em>'</code></a>
          </p><p>
            When reading from a row-based or statement-based log,
            rewrite all occurrences of
            <em class="replaceable"><code>from_name</code></em> to
            <em class="replaceable"><code>to_name</code></em>. Rewriting is done on the
            rows, for row-based logs, as well as on the
            <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE</code></a> clauses, for
            statement-based logs.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
              Statements in which table names are qualified with
              database names are not rewritten to use the new name when
              using this option.
</p>
</div>
<p>
            The rewrite rule employed as a value for this option is a
            string having the form
            <code class="literal">'<em class="replaceable"><code>from_name</code></em>-&gt;<em class="replaceable"><code>to_name</code></em>'</code>,
            as shown previously, and for this reason must be enclosed by
            quotation marks.
          </p><p>
            To employ multiple rewrite rules, specify the option
            multiple times, as shown here:
          </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqlbinlog --rewrite-db='dbcurrent-&gt;dbold' --rewrite-db='dbtest-&gt;dbcurrent' \
                     binlog.00001 &gt; /tmp/statements.sql</code></pre><p>
            When used together with the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_database"><code class="option">--database</code></a> option, the
            <code class="option">--rewrite-db</code> option is applied first; then
            <code class="option">--database</code> option is applied, using the
            rewritten database name. The order in which the options are
            provided makes no difference in this regard.
          </p><p>
            This means that, for example, if
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> is started with
            <code class="option">--rewrite-db='mydb-&gt;yourdb'
            --database=yourdb</code>, then all updates to any tables
            in databases <code class="literal">mydb</code> and
            <code class="literal">yourdb</code> are included in the output. On the
            other hand, if it is started with
            <code class="option">--rewrite-db='mydb-&gt;yourdb'
            --database=mydb</code>, then
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> outputs no statements at all:
            since all updates to <code class="literal">mydb</code> are first
            rewritten as updates to <code class="literal">yourdb</code> before
            applying the <code class="option">--database</code> option, there
            remain no updates that match
            <code class="option">--database=mydb</code>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_secure-auth"></a>
            <a class="indexterm" name="idm139663278599088"></a>

            <a class="indexterm" name="idm139663278597600"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_secure-auth"><code class="option">--secure-auth</code></a>
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_server-id"></a>
            <a class="indexterm" name="idm139663278593984"></a>

            <a class="indexterm" name="idm139663278592496"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-id"><code class="option">--server-id=<em class="replaceable"><code>id</code></em></code></a>
          </p><p>
            Display only those events created by the server having the
            given server ID.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_server-id-bits"></a>
            <a class="indexterm" name="idm139663278588048"></a>

            <a class="indexterm" name="idm139663278586560"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-id-bits"><code class="option">--server-id-bits=<em class="replaceable"><code>N</code></em></code></a>
          </p><p>
            Use only the first <em class="replaceable"><code>N</code></em> bits of the
            <a class="link" href="server-system-variables.html#sysvar_server_id"><code class="literal">server_id</code></a> to identify the
            server. If the binary log was written by a
            <a class="link" href="mysqld.html" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with server-id-bits set to less
            than 32 and user data stored in the most significant bit,
            running <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> with
            <code class="option">--server-id-bits</code> set to 32 enables this
            data to be seen.
          </p><p>
            This option is supported only by the version of
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> supplied with the NDB Cluster
            distribution, or built with NDB Cluster support.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_server-public-key-path"></a>
            <a class="indexterm" name="idm139663278575616"></a>

            <a class="indexterm" name="idm139663278574112"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-public-key-path"><code class="option">--server-public-key-path=<em class="replaceable"><code>file_name</code></em></code></a>
          </p><p>
            The path name to a file containing a client-side copy of the
            public key required by the server for RSA key pair-based
            password exchange. The file must be in PEM format. This
            option applies to clients that authenticate with the
            <code class="literal">sha256_password</code> or
            <code class="literal">caching_sha2_password</code> authentication
            plugin. This option is ignored for accounts that do not
            authenticate with one of those plugins. It is also ignored
            if RSA-based password exchange is not used, as is the case
            when the client connects to the server using a secure
            connection.
          </p><p>
            If
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_server-public-key-path"><code class="option">--server-public-key-path=<em class="replaceable"><code>file_name</code></em></code></a>
            is given and specifies a valid public key file, it takes
            precedence over
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_get-server-public-key"><code class="option">--get-server-public-key</code></a>.
          </p><p>
            For <code class="literal">sha256_password</code>, this option applies
            only if MySQL was built using OpenSSL.
          </p><p>
            For information about the <code class="literal">sha256_password</code>
            and <code class="literal">caching_sha2_password</code> plugins, see
            <a class="xref" href="sha256-pluggable-authentication.html" title="6.4.1.2 SHA-256 Pluggable Authentication">Section 6.4.1.2, “SHA-256 Pluggable Authentication”</a>, and
            <a class="xref" href="caching-sha2-pluggable-authentication.html" title="6.4.1.3 Caching SHA-2 Pluggable Authentication">Section 6.4.1.3, “Caching SHA-2 Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_set-charset"></a>
            <a class="indexterm" name="idm139663278560272"></a>

            <a class="indexterm" name="idm139663278558784"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_set-charset"><code class="option">--set-charset=<em class="replaceable"><code>charset_name</code></em></code></a>
          </p><p>
            Add a <a class="link" href="set-names.html" title="13.7.5.3 SET NAMES Syntax"><code class="literal">SET NAMES
            <em class="replaceable"><code>charset_name</code></em></code></a> statement
            to the output to specify the character set to be used for
            processing log files.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_shared-memory-base-name"></a>
            <a class="indexterm" name="idm139663278552720"></a>

            <a class="indexterm" name="idm139663278551216"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_shared-memory-base-name"><code class="option">--shared-memory-base-name=<em class="replaceable"><code>name</code></em></code></a>
          </p><p>
            On Windows, the shared-memory name to use, for connections
            made using shared memory to a local server. The default
            value is <code class="literal">MYSQL</code>. The shared-memory name is
            case-sensitive.
          </p><p>
            This option applies only if the server was started with the
            <a class="link" href="server-system-variables.html#sysvar_shared_memory"><code class="literal">shared_memory</code></a> system
            variable enabled to support shared-memory connections.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_short-form"></a>
            <a class="indexterm" name="idm139663278544160"></a>

            <a class="indexterm" name="idm139663278542672"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_short-form"><code class="option">--short-form</code></a>,
            <code class="option">-s</code>
          </p><p>
            Display only the statements contained in the log, without
            any extra information or row-based events. This is for
            testing only, and should not be used in production systems.
            It is deprecated, and will be removed in a future release.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_skip-gtids"></a>
            <a class="indexterm" name="idm139663278537952"></a>

            <a class="indexterm" name="idm139663278536464"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_skip-gtids"><code class="option">--skip-gtids[=(true|false)]</code></a>
          </p><p>
            Do not display any GTIDs in the output. This is needed when
            writing to a dump file from one or more binary logs
            containing GTIDs, as shown in this example:
          </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqlbinlog --skip-gtids binlog.000001 &gt;  /tmp/dump.sql
shell&gt; mysqlbinlog --skip-gtids binlog.000002 &gt;&gt; /tmp/dump.sql
shell&gt; mysql -u root -p -e "source /tmp/dump.sql"</code></pre><p>
            The use of this option is otherwise not normally recommended
            in production.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_socket"></a>
            <a class="indexterm" name="idm139663278528400"></a>

            <a class="indexterm" name="idm139663278526912"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_socket"><code class="option">--socket=<em class="replaceable"><code>path</code></em></code></a>,
            <code class="option">-S <em class="replaceable"><code>path</code></em></code>
          </p><p>
            For connections to <code class="literal">localhost</code>, the Unix
            socket file to use, or, on Windows, the name of the named
            pipe to use.
          </p><p>
            On Windows, this option applies only if the server was
            started with the <a class="link" href="server-system-variables.html#sysvar_named_pipe"><code class="literal">named_pipe</code></a>
            system variable enabled to support named-pipe connections.
            In addition, the user making the connection must be a member
            of the Windows group specified by the
            <a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group"><code class="literal">named_pipe_full_access_group</code></a>
            system variable.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_ssl"></a>
            <a class="indexterm" name="idm139663278517872"></a>

            <a class="indexterm" name="idm139663278516416"></a>

            <code class="option">--ssl*</code>
          </p><p>
            Options that begin with
            <a class="link" href="connection-options.html#option_general_ssl"><code class="option">--ssl</code></a> specify whether to
            connect to the server using SSL and indicate where to find
            SSL keys and certificates. See
            <a class="xref" href="connection-options.html#encrypted-connection-options" title="Command Options for Encrypted Connections">Command Options for Encrypted Connections</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_ssl-fips-mode"></a>
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl-fips-mode"><code class="option">--ssl-fips-mode={OFF|ON|STRICT}</code></a>
          </p><a class="indexterm" name="idm139663278510000"></a><p>
            Controls whether to enable FIPS mode on the client side. The
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a> option
            differs from other
            <code class="option">--ssl-<em class="replaceable"><code>xxx</code></em></code>
            options in that it is not used to establish encrypted
            connections, but rather to affect which cryptographic
            operations are permitted. See <a class="xref" href="fips-mode.html" title="6.5 FIPS Support">Section 6.5, “FIPS Support”</a>.
          </p><p>
            These <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a>
            values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">OFF</code>: Disable FIPS mode.
              </p></li><li class="listitem"><p>
                <code class="literal">ON</code>: Enable FIPS mode.
              </p></li><li class="listitem"><p>
                <code class="literal">STRICT</code>: Enable <span class="quote">“<span class="quote">strict</span>”</span>
                FIPS mode.
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
              If the OpenSSL FIPS Object Module is not available, the
              only permitted value for
              <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a> is
              <code class="literal">OFF</code>. In this case, setting
              <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a> to
              <code class="literal">ON</code> or <code class="literal">STRICT</code> causes
              the client to produce a warning at startup and to operate
              in non-FIPS mode.
</p>
</div>
</li><li class="listitem"><p><a name="option_mysqlbinlog_start-datetime"></a>
            <a class="indexterm" name="idm139663278492944"></a>

            <a class="indexterm" name="idm139663278491456"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_start-datetime"><code class="option">--start-datetime=<em class="replaceable"><code>datetime</code></em></code></a>
          </p><p>
            Start reading the binary log at the first event having a
            timestamp equal to or later than the
            <em class="replaceable"><code>datetime</code></em> argument. The
            <em class="replaceable"><code>datetime</code></em> value is relative to the
            local time zone on the machine where you run
            <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a>. The value should be in a
            format accepted for the
            <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> or
            <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> data types. For
            example:
          </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqlbinlog --start-datetime="2005-12-25 11:25:56" binlog.000003</code></pre><p>
            This option is useful for point-in-time recovery. See
            <a class="xref" href="backup-strategy-example.html" title="7.3 Example Backup and Recovery Strategy">Section 7.3, “Example Backup and Recovery Strategy”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_start-position"></a>
            <a class="indexterm" name="idm139663278479328"></a>

            <a class="indexterm" name="idm139663278477840"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_start-position"><code class="option">--start-position=<em class="replaceable"><code>N</code></em></code></a>,
            <code class="option">-j <em class="replaceable"><code>N</code></em></code>
          </p><p>
            Start reading the binary log at the first event having a
            position equal to or greater than
            <em class="replaceable"><code>N</code></em>. This option applies to the
            first log file named on the command line.
          </p><p>
            This option is useful for point-in-time recovery. See
            <a class="xref" href="backup-strategy-example.html" title="7.3 Example Backup and Recovery Strategy">Section 7.3, “Example Backup and Recovery Strategy”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_stop-datetime"></a>
            <a class="indexterm" name="idm139663278471120"></a>

            <a class="indexterm" name="idm139663278469632"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-datetime"><code class="option">--stop-datetime=<em class="replaceable"><code>datetime</code></em></code></a>
          </p><p>
            Stop reading the binary log at the first event having a
            timestamp equal to or later than the
            <em class="replaceable"><code>datetime</code></em> argument. This option is
            useful for point-in-time recovery. See the description of
            the <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_start-datetime"><code class="option">--start-datetime</code></a>
            option for information about the
            <em class="replaceable"><code>datetime</code></em> value.
          </p><p>
            This option is useful for point-in-time recovery. See
            <a class="xref" href="backup-strategy-example.html" title="7.3 Example Backup and Recovery Strategy">Section 7.3, “Example Backup and Recovery Strategy”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_stop-never"></a>
            <a class="indexterm" name="idm139663278461952"></a>

            <a class="indexterm" name="idm139663278460464"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never"><code class="option">--stop-never</code></a>
          </p><p>
            This option is used with
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>.
            It tells <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to remain connected
            to the server. Otherwise <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a>
            exits when the last log file has been transferred from the
            server. <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never"><code class="option">--stop-never</code></a>
            implies <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_to-last-log"><code class="option">--to-last-log</code></a>,
            so only the first log file to transfer need be named on the
            command line.
          </p><p>
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never"><code class="option">--stop-never</code></a> is commonly
            used with <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a> to make
            a live binary log backup, but also can be used without
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_raw"><code class="option">--raw</code></a> to maintain a
            continuous text display of log events as the server
            generates them.
          </p><p>
            With <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never"><code class="option">--stop-never</code></a>, by
            default, <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> reports a server ID
            of 1 when it connects to the server. Use
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_connection-server-id"><code class="option">--connection-server-id</code></a>
            to explicitly specify an alternative ID to report. It can be
            used to avoid a conflict with the ID of a slave server or
            another <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> process. See
            <a class="xref" href="mysqlbinlog-server-id.html" title="4.6.8.4 Specifying the mysqlbinlog Server ID">Section 4.6.8.4, “Specifying the mysqlbinlog Server ID”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_stop-never-slave-server-id"></a>
            <a class="indexterm" name="idm139663278441376"></a>

            <a class="indexterm" name="idm139663278439872"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-never-slave-server-id"><code class="option">--stop-never-slave-server-id=<em class="replaceable"><code>id</code></em></code></a>
          </p><p>
            This option is deprecated and will be removed in a future
            release. Use the
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_connection-server-id"><code class="option">--connection-server-id</code></a>
            option instead to specify a server ID for mysqlbinlog to
            report.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_stop-position"></a>
            <a class="indexterm" name="idm139663278434288"></a>

            <a class="indexterm" name="idm139663278432800"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-position"><code class="option">--stop-position=<em class="replaceable"><code>N</code></em></code></a>
          </p><p>
            Stop reading the binary log at the first event having a
            position equal to or greater than
            <em class="replaceable"><code>N</code></em>. This option applies to the
            last log file named on the command line.
          </p><p>
            This option is useful for point-in-time recovery. See
            <a class="xref" href="backup-strategy-example.html" title="7.3 Example Backup and Recovery Strategy">Section 7.3, “Example Backup and Recovery Strategy”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_tls-ciphersuites"></a>
            <a class="indexterm" name="idm139663278426752"></a>

            <a class="indexterm" name="idm139663278425264"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_tls-ciphersuites"><code class="option">--tls-ciphersuites=<em class="replaceable"><code>ciphersuite_list</code></em></code></a>
          </p><p>
            For client programs, specifies which TLSv1.3 ciphersuites
            the client permits for encrypted connections. The value is a
            list of one or more colon-separated ciphersuite names. The
            ciphersuites that can be named for this option depend on the
            SSL library used to compile MySQL. For details, see
            <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="6.3.5 Encrypted Connection Protocols and Ciphers">Section 6.3.5, “Encrypted Connection Protocols and Ciphers”</a>.
          </p><p>
            This option was added in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_tls-version"></a>
            <a class="indexterm" name="idm139663278419360"></a>

            <a class="indexterm" name="idm139663278417872"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_tls-version"><code class="option">--tls-version=<em class="replaceable"><code>protocol_list</code></em></code></a>
          </p><p>
            The permissible TLS protocols for encrypted connections. The
            value is a list of one or more comma-separated protocol
            names. The protocols that can be named for this option
            depend on the SSL library used to compile MySQL. For
            details, see
            <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="6.3.5 Encrypted Connection Protocols and Ciphers">Section 6.3.5, “Encrypted Connection Protocols and Ciphers”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_to-last-log"></a>
            <a class="indexterm" name="idm139663278412496"></a>

            <a class="indexterm" name="idm139663278411008"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_to-last-log"><code class="option">--to-last-log</code></a>,
            <code class="option">-t</code>
          </p><p>
            Do not stop at the end of the requested binary log from a
            MySQL server, but rather continue printing until the end of
            the last binary log. If you send the output to the same
            MySQL server, this may lead to an endless loop. This option
            requires
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_read-from-remote-server"><code class="option">--read-from-remote-server</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_user"></a>
            <a class="indexterm" name="idm139663278405264"></a>

            <a class="indexterm" name="idm139663278403808"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_user"><code class="option">--user=<em class="replaceable"><code>user_name</code></em></code></a>,
            <code class="option">-u <em class="replaceable"><code>user_name</code></em></code>
          </p><p>
            The user name of the MySQL account to use when connecting to
            a remote server.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_verbose"></a>
            <a class="indexterm" name="idm139663278398672"></a>

            <a class="indexterm" name="idm139663278397184"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verbose"><code class="option">--verbose</code></a>,
            <code class="option">-v</code>
          </p><p>
            Reconstruct row events and display them as commented SQL
            statements, with table partition information where
            applicable. If this option is given twice (by passing in
            either "-vv" or "--verbose --verbose"), the output includes
            comments to indicate column data types and some metadata,
            and informational log events such as row query log events if
            the
            <a class="link" href="replication-options-binary-log.html#sysvar_binlog_rows_query_log_events"><code class="literal">binlog_rows_query_log_events</code></a>
            system variable is set to <code class="literal">TRUE</code>.
          </p><p>
            For examples that show the effect of
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_base64-output"><code class="option">--base64-output</code></a> and
            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verbose"><code class="option">--verbose</code></a> on row event
            output, see <a class="xref" href="mysqlbinlog-row-events.html" title="4.6.8.2 mysqlbinlog Row Event Display">Section 4.6.8.2, “mysqlbinlog Row Event Display”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_verify-binlog-checksum"></a>
            <a class="indexterm" name="idm139663278386976"></a>

            <a class="indexterm" name="idm139663278385472"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_verify-binlog-checksum"><code class="option">--verify-binlog-checksum</code></a>,
            <code class="option">-c</code>
          </p><p>
            Verify checksums in binary log files.
          </p></li><li class="listitem"><p><a name="option_mysqlbinlog_version"></a>
            <a class="indexterm" name="idm139663278380864"></a>

            <a class="indexterm" name="idm139663278379376"></a>

            <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_version"><code class="option">--version</code></a>,
            <code class="option">-V</code>
          </p><p>
            Display version information and exit.
          </p><p>
            The <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> version number shown when
            using this option is 3.4.
</p></li></ul>
</div>
<p>
        You can pipe the output of <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> into
        the <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client to execute the events
        contained in the binary log. This technique is used to recover
        from a crash when you have an old backup (see
        <a class="xref" href="point-in-time-recovery.html" title="7.5 Point-in-Time (Incremental) Recovery Using the Binary Log">Section 7.5, “Point-in-Time (Incremental) Recovery Using the Binary Log”</a>). For example:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqlbinlog binlog.000001 | mysql -u root -p</code></pre><p>
        Or:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqlbinlog binlog.[0-9]* | mysql -u root -p</code></pre><p>
        If the statements produced by <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> may
        contain <a class="link" href="blob.html" title="11.4.3 The BLOB and TEXT Types"><code class="literal">BLOB</code></a> values, these may
        cause problems when <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> processes them. In
        this case, invoke <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> with the
        <a class="link" href="mysql-command-options.html#option_mysql_binary-mode"><code class="option">--binary-mode</code></a> option.
      </p><p>
        You can also redirect the output of
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> to a text file instead, if you
        need to modify the statement log first (for example, to remove
        statements that you do not want to execute for some reason).
        After editing the file, execute the statements that it contains
        by using it as input to the <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> program:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqlbinlog binlog.000001 &gt; tmpfile
shell&gt; ... <em class="replaceable">edit tmpfile</em> ...
shell&gt; mysql -u root -p &lt; tmpfile</code></pre><p>
        When <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> is invoked with the
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_start-position"><code class="option">--start-position</code></a> option, it
        displays only those events with an offset in the binary log
        greater than or equal to a given position (the given position
        must match the start of one event). It also has options to stop
        and start when it sees an event with a given date and time. This
        enables you to perform point-in-time recovery using the
        <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_stop-datetime"><code class="option">--stop-datetime</code></a> option (to
        be able to say, for example, <span class="quote">“<span class="quote">roll forward my databases to
        how they were today at 10:30 a.m.</span>”</span>).
      </p><p><b>Processing multiple files. </b>
          If you have more than one binary log to execute on the MySQL
          server, the safe method is to process them all using a single
          connection to the server. Here is an example that demonstrates
          what may be <span class="emphasis"><em>unsafe</em></span>:
        </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqlbinlog binlog.000001 | mysql -u root -p # DANGER!!
shell&gt; mysqlbinlog binlog.000002 | mysql -u root -p # DANGER!!</code></pre><p>
        Processing binary logs this way using multiple connections to
        the server causes problems if the first log file contains a
        <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TEMPORARY
        TABLE</code></a> statement and the second log contains a
        statement that uses the temporary table. When the first
        <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> process terminates, the server drops
        the temporary table. When the second <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>
        process attempts to use the table, the server reports
        <span class="quote">“<span class="quote">unknown table.</span>”</span>
      </p><p>
        To avoid problems like this, use a <span class="emphasis"><em>single</em></span>
        <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> process to execute the contents of all
        binary logs that you want to process. Here is one way to do so:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqlbinlog binlog.000001 binlog.000002 | mysql -u root -p</code></pre><p>
        Another approach is to write all the logs to a single file and
        then process the file:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqlbinlog binlog.000001 &gt;  /tmp/statements.sql
shell&gt; mysqlbinlog binlog.000002 &gt;&gt; /tmp/statements.sql
shell&gt; mysql -u root -p -e "source /tmp/statements.sql"</code></pre><p>
        From MySQL 8.0.12, you can also supply multiple binary log files
        to <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> as streamed input using a
        shell pipe. An archive of compressed binary log files can be
        decompressed and provided directly to
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a>. In this example,
        <code class="filename">binlog-files_1.gz</code> contains multiple binary
        log files for processing. The pipeline extracts the contents of
        <code class="filename">binlog-files_1.gz</code>, pipes the binary log
        files to <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> as standard input, and
        pipes the output of <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> into the
        <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client for execution:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; gzip -cd binlog-files_1.gz | ./mysqlbinlog - | ./mysql -uroot  -p</code></pre><p>
        You can specify more than one archive file, for example:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; gzip -cd binlog-files_1.gz binlog-files_2.gz | ./mysqlbinlog - | ./mysql -uroot  -p</code></pre><p>
        For streamed input, do not use
        <code class="literal">--stop-position</code>, because
        <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> cannot identify the last log file
        to apply this option.
      </p><p><b>LOAD DATA operations. </b>
          <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> can produce output that
          reproduces a <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>
          operation without the original data file.
          <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> copies the data to a temporary
          file and writes a
          <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA
          LOCAL</code></a> statement that refers to the file. The default
          location of the directory where these files are written is
          system-specific. To specify a directory explicitly, use the
          <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_local-load"><code class="option">--local-load</code></a> option.
        </p><p>
        Because <a class="link" href="mysqlbinlog.html" title="4.6.8 mysqlbinlog — Utility for Processing Binary Log Files"><span class="command"><strong>mysqlbinlog</strong></span></a> converts
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> statements to
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA
        LOCAL</code></a> statements (that is, it adds
        <code class="literal">LOCAL</code>), both the client and the server that
        you use to process the statements must be configured with the
        <code class="literal">LOCAL</code> capability enabled. See
        <a class="xref" href="load-data-local.html" title="6.1.6 Security Issues with LOAD DATA LOCAL">Section 6.1.6, “Security Issues with LOAD DATA LOCAL”</a>.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
          The temporary files created for
          <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA
          LOCAL</code></a> statements are <span class="emphasis"><em>not</em></span>
          automatically deleted because they are needed until you
          actually execute those statements. You should delete the
          temporary files yourself after you no longer need the
          statement log. The files can be found in the temporary file
          directory and have names like
          <em class="replaceable"><code>original_file_name-#-#</code></em>.
</p>
</div>
</div><br />
        </div>

                <div id="docs-in-page-nav-container">
            <div id="docs-in-page-nav">
                
    <a href="mysql-config-editor.html"
        aria-label="Previous" title="Previous: mysql_config_editor — MySQL Configuration Utility"><span
        class="icon-chevron-left"></span> PREV</a> &nbsp;
<a href="index.html" aria-label="Start" title="Start"> HOME</a> &nbsp;
        <a aria-label="Up" href="programs-admin-utils.html" title="Up: MySQL Administrative and Utility Programs"> UP</a> &nbsp;
    <a href="mysqlbinlog-hexdump.html" aria-label="Next"
        title="Next: mysqlbinlog Hex Dump Format">NEXT <span
        class="icon-chevron-right"></span></a>
            </div>
        </div>
        
         <div id="docs-body-extra">
             
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>
         </div>

              </div>
     </div>

</div>

<script>
$(function() {
    var doc = new $.doc({ 'mobile': $.browser.mobile, 'docId': 1, 'highlight': true });
});
</script>
    

            
        </div>
    </div>

    <footer class="collapsed">
        <div id="footer-bottom">
                                    <div id="footer-collapse">
                <a href="" id="expand-footer"
                    aria-label="Expand Footer"
                    title="Expand Footer"><span
                    class="icon-plus-square"></span></a>
            </div>
                        <div class="footer-contact">
                <div id="footer-contact-icon" style="display: none;">
                    <span class="icon-call-phone"></span>
                </div>
                <div id="footer-contact-numbers" style="display: none;">
                    <strong>Contact MySQL Sales</strong><br/>
                    USA/Canada: +1-866-221-0634 &nbsp;
                    (<a href="https://www.mysql.com/about/contact/phone/">More Countries &raquo;</a>)
                </div>
                <div id="footer-contact-copyright" style="display: inline-block;">
                    <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                    &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                </div>
            </div>
            <div class="social-icons">
                <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook-square"></span></a>
                <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter-square"></span></a>
                <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin-square"></span></a>
                <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube-square"></span></a>
            </div>
            <br class="clear" />
        </div>
        <div id="footer-links">

            <div id="footer-nav"></div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/products/">Products</a></li>
                    <li><a href="https://www.mysql.com/cloud/">Oracle MySQL Cloud Service</a></li>
                    <li><a href="https://www.mysql.com/products/enterprise/">MySQL Enterprise Edition</a></li>
                    <li><a href="https://www.mysql.com/products/standard/">MySQL Standard Edition</a></li>
                    <li><a href="https://www.mysql.com/products/classic/">MySQL Classic Edition</a></li>
                    <li><a href="https://www.mysql.com/products/cluster/">MySQL Cluster CGE</a></li>
                    <li><a href="https://www.mysql.com/oem/">MySQL Embedded (OEM/ISV)</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/services/">Services</a></li>
                    <li><a href="https://www.mysql.com/training/">Training</a></li>
                    <li><a href="https://www.mysql.com/certification/">Certification</a></li>
                    <li><a href="https://www.mysql.com/consulting/">Consulting</a></li>
                    <li><a href="https://www.mysql.com/support/">Support</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/downloads/">Downloads</a></li>
                    <li><a href="https://dev.mysql.com/downloads/mysql/">MySQL Community Server</a></li>
                    <li><a href="https://dev.mysql.com/downloads/cluster/">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/downloads/shell/">MySQL Shell</a></li>
                    <li><a href="https://dev.mysql.com/downloads/router/">MySQL Router</a></li>
                    <li><a href="https://dev.mysql.com/downloads/workbench/">MySQL Workbench</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/doc/">Documentation</a></li>
                    <li><a href="https://dev.mysql.com/doc/refman/en/">MySQL Reference Manual</a></li>
                    <li><a href="https://dev.mysql.com/doc/workbench/en/">MySQL Workbench</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-cluster.html">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-connectors.html">MySQL Connectors</a></li>
                    <li><a href="https://dev.mysql.com/doc/#topic">Topic Guides</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/about/">About MySQL</a></li>
                    <li><a href="https://www.mysql.com/about/contact/">Contact Us</a></li>
                                                            <li><a href="https://www.mysql.com/buy-mysql/">How to Buy</a></li>
                    <li><a href="https://www.mysql.com/partners/">Partners</a></li>
                    <li><a href="https://www.mysql.com/about/jobs/">Job Opportunities</a></li>
                    <li><a href="https://www.mysql.com/sitemap.html">Site Map</a></li>
                </ul>
            </div>

            
            <div id="footer-logo">
                <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                <div class="footer-legal-links">
                    <a href="https://www.mysql.com/about/legal/">Legal Policies</a> |
                    <a href="http://www.oracle.com/us/legal/privacy/index.htm">Your Privacy Rights</a> |
                    <a href="http://www.oracle.com/us/legal/terms/index.html">Terms of Use</a> |
                    <a href="http://www.oracle.com/us/legal/third-party-trademarks/index.html">Trademark Policy</a> |
                    <a href="http://www.oracle.com/technetwork/community/oca-486395.html">Contributor Agreement</a> |
                    <div id="teconsent" style="display: inline-block"><script async="async" type="text/javascript" src="js/notice.js" crossorigin=""></script></div>
                </div>
            </div>

        </div>
    </footer>
</div>

        <script src="js/s_code_remote.js"></script>

        
    
</body>
</html>
